package com.iyang.bootadmin.controller;

import com.iyang.bootadmin.mapper.UserMapper;
import com.iyang.bootadmin.serivcie.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Mu_YI
 * @Date: 2019/3/9 14:41
 * @Version 1.0
 */

@Controller
@RequestMapping("/api/v1/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping
    @ResponseBody
    public boolean login(String username,String password){
        return userService.login(username,password);
    }

    @RequestMapping("list")
    public String userList(){
        return "member/list";
    }

    @RequestMapping("/test")
    public String test(){
        return "member/list";
    }

}
